from datetime import date,timedelta
from random import randint

def init_data(nameList):
    dic = {}.fromkeys(nameList)
    print(dic)
    for key in dic:
        year = randint(1990,1999)
        month = randint(1,12)
        day = randint(1,30)
        dic[key] = date(year,month,day)
    print(dic)
    return dic

def get_summer_person(dic):
    li = []
    for key in dic:
        if dic[key].month>=6 and dic[key].month<=8:
            li.append(key)
    return li

# if __name__ == '__main__':
list_name = ["赵一", "杨二", "张三", "李四", "王五", "赵六", "马七", "郑八", "刘九", "胡十"]
d= init_data(list_name)
li = get_summer_person(d)
print(li)
